home *** CD-ROM | disk | FTP | other *** search
- // smilectl.h : Declaration of the CSmileCtrl OLE control class.
-
- /////////////////////////////////////////////////////////////////////////////
- // CSmileCtrl : See smilectl.cpp for implementation.
-
- class CSmileCtrl : public COleControl
- {
- DECLARE_DYNCREATE(CSmileCtrl)
-
- // Constructor
- public:
- CSmileCtrl();
-
- // Overrides
-
- // Drawing function
- virtual void OnDraw(
- CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
-
- // Persistence
- virtual void DoPropExchange(CPropExchange* pPX);
-
- // Reset control state
- virtual void OnResetState();
-
- // Implementation
- protected:
- ~CSmileCtrl();
-
- BOOL InEllipse(const CPoint& pt, int x1, int y1, int x2, int y2);
-
- DECLARE_OLECREATE_EX(CSmileCtrl) // Class factory and guid
- DECLARE_OLETYPELIB(CSmileCtrl) // GetTypeInfo
- DECLARE_PROPPAGEIDS(CSmileCtrl) // Property page IDs
- DECLARE_OLECTLTYPE(CSmileCtrl) // Type name and misc status
-
- // Message maps
- //{{AFX_MSG(CSmileCtrl)
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
-
- // Dispatch maps
- //{{AFX_DISPATCH(CSmileCtrl)
- BOOL m_sad;
- afx_msg void OnSadChanged();
- afx_msg void Beep(short uAlert);
- //}}AFX_DISPATCH
- DECLARE_DISPATCH_MAP()
-
- afx_msg void AboutBox();
-
- // Event maps
- //{{AFX_EVENT(CSmileCtrl)
- void FireOutside()
- {FireEvent(eventidOutside,EVENT_PARAM(VTS_NONE));}
- void FireInside(short X, short Y)
- {FireEvent(eventidInside,EVENT_PARAM(VTS_I2 VTS_I2), X, Y);}
- //}}AFX_EVENT
- DECLARE_EVENT_MAP()
-
- // Dispatch and event IDs
- public:
- enum {
- //{{AFX_DISP_ID(CSmileCtrl)
- dispidSad = 1L,
- dispidBeep = 2L,
- eventidOutside = 1L,
- eventidInside = 2L,
- //}}AFX_DISP_ID
- };
- };
-